﻿using UnityEngine;
using System.Collections;

public class TroubleResultScreen : Actors
{
	public float m_ButtonPositionX = 0.5f;
	public float m_ButtonPositionY = 0.5f;

	public float m_ButtonWidth = 0.15f;
	public float m_ButtonHeight = 0.1f;

	private Rect m_ButtonRect = new Rect();
	private Vector2 m_RectPosition = new Vector2();

	void Start () 
	{

	}

	private void OnGUI()
	{
		m_RectPosition.x = Screen.width * (m_ButtonPositionX - m_ButtonWidth/2f);
		m_RectPosition.y = Screen.height * (m_ButtonPositionY - m_ButtonHeight/2f);
		m_ButtonRect.position = m_RectPosition;
		m_ButtonRect.width = Screen.width * m_ButtonWidth;
		m_ButtonRect.height = Screen.height * m_ButtonHeight;
		if (GUI.Button(m_ButtonRect, "REPLAY"))
		{
			//Application.LoadLevel((int)GamesManager.m_ScenesID.TroubleGame);
			Application.LoadLevel((int)GamesManager.m_ScenesID.MainMenu);
		}
	}
}
